package entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

/**
 * The type Category.
 */
public class Category extends Common implements Serializable {
    private static final long serialVersionUID = 339534937109205006L;
    @TableId(type = IdType.ID_WORKER_STR)
    private String id;


    /**
     * To string string.
     *
     * @return the string
     */
    @Override
    public String toString() {
        return "Category{" +
                "id='" + id + '\'' +
                ", cname='" + cname + '\'' +
                ", parentId='" + parentId + '\'' +
                ", type=" + type +
                ", delete=" + delete +
                '}';
    }

    /**
     * Instantiates a new Category.
     *
     * @param id       the id
     * @param cname    the cname
     * @param parentId the parent id
     * @param type     the type
     * @param delete   the delete
     * @author overlook
     * @date 2022 -04-16 20:30:17
     */
    public Category(String id, String cname, String parentId, Integer type, Integer delete) {
        this.id = id;
        this.cname = cname;
        this.parentId = parentId;
        this.type = type;
        this.delete = delete;
    }

    /**
     * Instantiates a new Category.
     *
     * @author overlook
     * @date 2022 -04-16 20:30:17
     */
    public Category() {
    }

    /**
     * Gets serial version uid.
     *
     * @return the serial version uid
     * @author overlook
     * @date 2022 -04-16 20:30:17
     */
    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    /**
     * Gets parent id.
     *
     * @return the parent id
     * @author overlook
     * @date 2022 -04-16 20:30:17
     */
    public String getParentId() {
        return parentId;
    }

    /**
     * Sets parent id.
     *
     * @param parentId the parent id
     * @author overlook
     * @date 2022 -04-16 20:30:17
     */
    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    /**
     * Gets type.
     *
     * @return the type
     * @author overlook
     * @date 2022 -04-16 20:30:17
     */
    public Integer getType() {
        return type;
    }

    /**
     * Sets type.
     *
     * @param type the type
     * @author overlook
     * @date 2022 -04-16 20:30:17
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * Gets delete.
     *
     * @return the delete
     * @author overlook
     * @date 2022 -04-16 20:30:18
     */
    public Integer getDelete() {
        return delete;
    }

    /**
     * Sets delete.
     *
     * @param delete the delete
     * @author overlook
     * @date 2022 -04-16 20:30:18
     */
    public void setDelete(Integer delete) {
        this.delete = delete;
    }

    /**
     * 分类名称
     */
    private String cname;
    /**
     * 父分类id
     */
    @TableField(value = "parentId")
    private String parentId;
    /**
     * 分类等级
     */
    private Integer type;
    /**
     * 删除状态，0未删除，1已删除
     */
    private Integer delete;


    /**
     * Gets id.
     *
     * @return the id
     * @author overlook
     * @date 2022 -04-16 20:30:18
     */
    public String getId() {
        return id;
    }

    /**
     * Sets id.
     *
     * @param id the id
     * @author overlook
     * @date 2022 -04-16 20:30:18
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Gets cname.
     *
     * @return the cname
     * @author overlook
     * @date 2022 -04-16 20:30:18
     */
    public String getCname() {
        return cname;
    }

    /**
     * Sets cname.
     *
     * @param cname the cname
     * @author overlook
     * @date 2022 -04-16 20:30:18
     */
    public void setCname(String cname) {
        this.cname = cname;
    }



}

